﻿using MusicStore.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MusicStore.Controllers
{
    public class CreateuserController : Controller
    {
        MusicStoreDB db = new MusicStoreDB();
        public ActionResult Index()
        {
            return View();
        }
        public ActionResult Create()
        {
            return View();
        }
        [HttpPost]
        public ActionResult Create(Createuser createuser)
        {
            if (ModelState.IsValid)
            {
                db.Createusers.Add(createuser);
                db.SaveChanges();
                return RedirectToAction("Index");
            }
            return View(createuser);
        }
    }
}